-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract caldav sharing stuff from publishing stuff #34873
Conversation
* @var IConfig | ||
*/ | ||
protected $config; | ||
protected Server $server; |
Check notice
Code scanning / Psalm
PropertyNotSetInConstructor
class SharingPlugin extends ServerPlugin { | ||
public const NS_CALENDARSERVER = 'http://calendarserver.org/ns/'; | ||
|
||
protected Server $server; |
Check notice
Code scanning / Psalm
PropertyNotSetInConstructor
* | ||
* @param Server $server | ||
*/ | ||
public function initialize(Server $server) { |
Check notice
Code scanning / Psalm
MissingReturnType
$this->server->on('propFind', [$this, 'propFind']); | ||
} | ||
|
||
public function propFind(PropFind $propFind, INode $node) { |
Check notice
Code scanning / Psalm
MissingReturnType
Didn't notice any problems after applying this patch on 24.0.5. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- no value set - public share links work and is an option in calendar
- value set to yes - public share link works and is an option in calendar
- value set to no - public share link does not work and there is not an option to create a public share link in calendar but sharing with users and groups still works
This mod disallows sharing calendars via link when `shareapi_allow_links` is disabled. Related: nextcloud/calendar#525 Related: nextcloud/calendar#4399 Author-Change-Id: IB#1126264 Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
So that it's still there when we disable the PublishPlugin Signed-off-by: Thomas Citharel <tcit@tcit.fr>
4fd3cba
to
7f87ac8
Compare
🙌 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add tests?
Due to the callbacks, Sabre patterns are hard to test, there would be low value for added tests here. Not sure if it's impossible, but it's never been done before in all other plugins. |
After upgrading to server 25.0.3 with this mod applied + calendar 4.2.1, when
...then After enabling...
...clicking Seems that server blocks sharing via link correctly but calendar app after upgrade should have |
@tcitworld can you please fix the conflicts and the tests? Thanks in advance! :) |
Related: nextcloud/server#34873 Author-Change-Id: IB#1126264 Signed-off-by: Pawel Boguslawski <pawel.boguslawski@ib.pl>
nextcloud/calendar#5679 fixes |
Based on and replaces #34372 by @pboguslawski
The publishing plugin handled both doing the actual publishing/unpublishing as well as exposing the supported sharing features.
Now we have one for each use and publishing can be properly disabled. The CalDAVSharingPlugin will probably be useful for most of the issues in #20096 anyway.